package zoo;

public class Person {
    String name;

    public Person() {
    }

    public Person(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void say(){
        System.out.println("大家好，我是饲养员"+this.name);
    }
    public void feed(Animal a ,Food f ){
        a.eat(f);
        a.shout();
    }

    public static void main(String[] args) {
        Person p=new Person("张三");
        Cat cat = new Cat("美短");
        Food food=new Food("鱼罐头");
        p.say();
        p.feed(cat,food);
        Dog dog =new Dog("金毛");
        p.feed(dog,new Food("肉骨头"));

    }
}
